package com.getpebble.android.framework.protocol.outbound;

import com.getpebble.android.framework.protocol.EndpointId;
import java.nio.ByteBuffer;

public class PblOutboundByteMessage extends PblOutboundMessage {
    private ByteBuffer mByteBuffer;

    public PblOutboundByteMessage(EndpointId endpointId, ByteBuffer byteBuffer) {
        super(endpointId);
        this.mByteBuffer = byteBuffer;
    }

    public synchronized byte[] getBytes() {
        if (!areBytesCached()) {
            addBytes(this.mByteBuffer);
        }
        return super.getBytes();
    }
}
